unit DM;

interface

uses
  System.SysUtils, System.Classes, MemDS, DBAccess, Uni, UniProvider,
  SQLiteUniProvider, MemTableDataEh,  DataDriverEh, MemTableEh, Db,app;

type
  TDataModule1 = class(TDataModule)
    uniconn: TUniConnection;
    SQLiteUniProvider1: TSQLiteUniProvider;
    unidepart: TUniTable;
    dsdepart: TUniDataSource;
    unidepartlook: TUniTable;
    dsdepartlook: TUniDataSource;
    uniuser: TUniTable;
    dsuser: TUniDataSource;
    unitmp: TUniQuery;
    dsclda: TUniDataSource;
    dsserviceitem: TUniDataSource;
    unidic: TUniQuery;
    uniclda: TUniQuery;
    dsdic: TUniDataSource;
    unifwlx: TUniTable;
    dsfwlx: TUniDataSource;
    unifwlb: TUniTable;
    dsfwlb: TUniDataSource;
    unitclx: TUniTable;
    dstclx: TUniDataSource;
    uniwlzd: TUniQuery;
    dswlzd: TUniDataSource;
    uniwllb: TUniTable;
    dswllb: TUniDataSource;
    unihyklx: TUniQuery;
    dshyklx: TUniDataSource;
    unicangku: TUniTable;
    dscangku: TUniDataSource;
    unick: TUniQuery;
    dsck: TUniDataSource;
    uniserviceitem: TUniQuery;
    unikcrkd: TUniQuery;
    dskcrkd: TUniDataSource;
    unikcpdb: TUniQuery;
    dskcpdb: TUniDataSource;
    dsmodule: TUniDataSource;
    unimodule: TUniTable;
    unimodulelookup: TUniTable;
    dsmodulelookup: TUniDataSource;
    unicheckpopedom: TUniQuery;
    procedure DataModuleCreate(Sender: TObject);
    procedure DataModuleDestroy(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  DataModule1: TDataModule1;


implementation
uses
  dbhelper;

{%CLASSGROUP 'System.Classes.TPersistent'}

{$R *.dfm}

procedure TDataModule1.DataModuleCreate(Sender: TObject);
begin
  uniconn.database:='resource/db';
  app.db:=TDbHelper.Create(uniconn);
end;

procedure TDataModule1.DataModuleDestroy(Sender: TObject);
begin
  FreeAndNil(app.db);
end;

end.
